<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Basic Drag and Drop</title>
    <link type="text/css" href="Style/DragDrop.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="TheScriptManager" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Microsoft.Web.Preview" Name="PreviewScript.js"/>
            <asp:ScriptReference Assembly="Microsoft.Web.Preview" Name="PreviewDragDrop.js"/>
            <asp:ScriptReference Path="~/ScriptLibrary/BookItem.js" />
            <asp:ScriptReference Path="~/ScriptLibrary/CartZone.js" />
        </Scripts>
    </asp:ScriptManager>
    
    <h2>Drag the Book over the Cart</h2>
    <hr />
    
    <!-- Book Item -->
    <img id="imgBook" src="Images/book.jpg" alt="" class="panel" />

    <!-- Cart Zone -->
    <div id="cartZone" class="dropzone">
        <img src="Images/cart.png" alt="" />
    </div>

    <script type="text/javascript">
    <!--
        Sys.Application.add_init(pageInit);
        
        function pageInit() {
            $create(Samples.BookItem, {bookId:'1-933988-14-2'}, null, null, $get('imgBook'));
            $create(Samples.CartZone, null, null, null, $get('cartZone'));
        }
    //-->
    </script>
    </form>
</body>
</html>
